import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
//导入组件
import login from '@/views/user/login.vue'
//创建路由规则
const routes = [
  {
    path: '/login',
    name: 'login',
    component: login
  },
]

//创建路由对象 挂载到vue实例
const router = new VueRouter({
  routes
})


//导出路由对象
export default router
